package com.scf.common.vo;


import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Delegate;

import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;

/**
 * @author sunchuanfu
 * @since 2024/7/2
 */
@Getter
@Setter
public class ValidationList<E> implements List<E> {

    @Delegate // @Delegate是lombok注解
    // 如果报错：“@delegate can only use concrete class types, not wildcards, arrays, type variables, or primitives.”，升级lombok版本可解决[版本1.18.34不报错]）
    @Valid // 一定要加@Valid注解
    public List<E> list = new ArrayList<>();

}
